const a = {
    name: 'sun',
    age: 20,
    language: ['chinese', 'english'],
    skill: {
        eat: 'do eat',
        song: 'so song'
    }
}

function cloneShallow(src) {
    /* const dist = {};
    for (const key in src) {
        dist[key] = src[key];
    }
    return dist; */
    return {
        ...src
    };
}
const b = cloneShallow(a);
b.name = 'yang';
b.language.pop();
b.skill.dance = 'do dance';
console.log(b, a)